<?php
!defined('P_W') && exit('Forbidden');

class PW_DeveloperDB extends BaseDB {

	var $_tableName = "pw_house_developer";
	
	function getById($id) {
		return $this->_db->get_one('SELECT * FROM ' . $this->_tableName . ' WHERE id=' . pwEscape($id));
	}

	function getList($_sql_where, $offset, $limit) {
		$_sql_limit = $limit ? pwLimit($offset, $limit) : '';
		$tmpdb = array();
		$query = $this->_db->query('SELECT * FROM ' . $this->_tableName . " WHERE 1{$_sql_where} $_sql_limit");
		while ($rt = $this->_db->fetch_array($query)) {
			$tmpdb[$rt['id']] = $rt;
		}
		return $tmpdb;
	}
}
?>